<template>
  <router-link class="sight-item" :to="{name: 'SightDetail', params: {id: item1.id}}">
    <img :src="item1.main_img" :alt="item1.name">
    <div class="right">
      <h5>{{ item1.name }}</h5>
      <van-rate v-model="item1.score" readonly/>
      <div class="tips">{{ item1.comment_count }}人点评 | 100%满意</div>
      <div class="tips light">{{ item1.province }}-{{ item1.city }}</div>
      <div class="line-price">￥ {{ item1.min_price }}起</div>
    </div>
  </router-link>
</template>
<script>
export default {
  props: ['item'],
  data () {
    return {
      item1: this.item
    }
  }
}
</script>
<style lang="less">
// 景点列表
.sight-item {
  display: flex;
  padding-top: 10px;
  border-bottom: 1px solid #f6f6f6;
  background-color: #fff;
  img {
    width: 100px;
    height: 100px;
  }
  h5 {
    color: #212121;
    font-size: 14px;
    padding: 5px 0;
    margin: 0;
  }
  .right {
    flex-grow: 1;
    text-align: left;
    justify-content: left;
    padding-left: 5px;
    position: relative;
  }
  .line-price {
    position: absolute;
    right: 10px;
    top: 20px;
    display: inline-block;
    color: #f50;
    font-size: 16px;
    font-weight: bold;
  }
  .tips {
    font-size: 12px;
    color: #666;
    &.light {
        color: #999;
    }
  }
}
</style>
